﻿using System;

namespace YmtAuth.Dto
{
    public class TencentLoginProtectionRequestDto
    {
        public int AccountType { get; set; }   //账号类型
        public string Uid { get; set; }   //用户ID

        public string LoginIp { get; set; }  //登录IP

        public DateTime LoginTime { get; set; }  //登录时间

        /// <summary>
        /// 登录结果  1 成功   0 失败
        /// </summary>
        public int Result { get; set; }

        public string GetRequestUrl()
        {
            return "http://csec.api.qcloud.com/v2/index.php?Action=LoginProtection&" + ToString();
        }

        public override string ToString()
        {
            return
                string.Format(
                    "accountType={0}&uid={1}&loginIp={4}&loginTime={5}&result={6}"
                    , AccountType, Uid, LoginIp, LoginTime, Result);
        }
    }
}